package com.xpsoft.oa.dao.project.impl;


import java.util.List;

import org.hibernate.Query;

import com.xpsoft.core.dao.impl.BaseDaoImpl;
import com.xpsoft.oa.dao.project.ProjectSignRegInfoDao;
import com.xpsoft.oa.model.project.ProjectSignRegInfo;

public class ProjectSignRegInfoDaoImpl extends BaseDaoImpl<ProjectSignRegInfo> implements ProjectSignRegInfoDao{

	public ProjectSignRegInfoDaoImpl() {
		super(ProjectSignRegInfo.class);
	}

	@Override
	public void deleteProjectSignRegInfos(Long regId, List<Long> idList) {
		// TODO Auto-generated method stub
		String hql = "delete from ProjectSignRegInfo where id not in (:ids) and projectSignReg.id=:regId";
		Query query =  getSession().createQuery(hql);
		query.setParameterList("ids", idList).setParameter("regId", regId);
		query.executeUpdate();
	}

}